# -*- coding:utf-8 -*-
#!/usr/bin/env python

from Tkinter import *

def resize(ev=None):
	# print "%d"% scale.get()
	label.config(font='Helvetica -%d bold'%scale.get())

#根窗口
root = Tk()
#设定根窗口大小
root.geometry('350x150')

#font设定字体
label = Label(root,text='Hello World!',font='Helvetica -12 bold')
#fill参数告诉pack让label填充水平方向的剩余空间
label.pack(fill=X,expand=1)

scale= Scale(root,from_=10,to=40,orient=HORIZONTAL,command=resize)
scale.set(12)
scale.pack(fill=X,expand=1)

quit = Button(root,text='QUIT',command=root.quit,activebackground='red',activeforeground='white')
quit.pack()

mainloop()